#ifndef __PLAYER_UTILITY_PRIVATE_H__
#define __PLAYER_UTILITY_PRIVATE_H__

#include <MdaAudioSamplePlayer.h>


class PlayerUtility;

class PlayerUtilityPrivate : public CBase, public MMdaAudioPlayerCallback
{
public:
    static PlayerUtilityPrivate* NewL(const TDesC& aFileName, PlayerUtility *wrapper);
    static PlayerUtilityPrivate* NewLC(const TDesC& aFileName, PlayerUtility *wrapper);
    ~PlayerUtilityPrivate();
private:
    PlayerUtilityPrivate(PlayerUtility *wrapper);
    void ConstructL(const TDesC& aFileName);
public:
    void play();
    void stop();
    void pause();
    void setLoops(bool loop);
    void setVolume(int volume);
    void setImmediately(bool immediately);
    TInt maxVolume();
    TInt getVolume(TInt& aVolume);
    bool IsPlaying() {return m_playing;}
public:
    void MapcInitComplete(TInt aError, const TTimeIntervalMicroSeconds& aDuration);
    void MapcPlayComplete(TInt aError);
private:
    PlayerUtility           *q_ptr;
    CMdaAudioPlayerUtility  *m_playUtility;
    bool m_isLoop;
    bool m_isImmediately;
    TBool m_playing,m_prepared;
};

void PlayerUtilityPrivate::setImmediately(bool immediately)
{
    m_isImmediately = immediately;
}

#endif //__PLAYER_UTILITY_PRIVATE_H__
